<%@ page language="java" pageEncoding="UTF-8" import="java.util.*"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"  %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
String strContent="123654";
pageContext.setAttribute("key01", strContent);
int[] intArray={1,2,3,4,5};
pageContext.setAttribute("key02", intArray);
Map<String,String> stringForMap=new HashMap<String,String>();
stringForMap.put("01", "1");
stringForMap.put("02", "2");
stringForMap.put("03", "3");
pageContext.setAttribute("key03", stringForMap);
%>
<!--  
${fn:length(shoppingCart.products)}

-->
字符串的长度：${fn:length(key01) }<br>
数组的长度：${fn:length(key02) }<br>
map容器的长度：${fn:length(key03) }<br>
</body>
</html>